package cn.cdeden.knowledge.domain;


import cn.cdeden.common.translation.annotation.Translation;
import cn.cdeden.common.translation.constant.TransConstant;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;


@Data
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class Template implements Serializable {

    private Long id;
    private Long deleteId;
    private String themeName;
    private String realName;
    private String imageUrl;
    private Long fileStorage;
    private String imageStorage;
    @Translation(type = TransConstant.OSS_ID_TO_COVER_URL)
    private String thumbnailBase64;
    private String createBy;
    private Date createTime;
    private Long parentId;
    private Integer download;
    private Integer likes;
    private Integer collection;
    private String suffix;
    private String description;
    private String preview;
    private Integer point;
    private String state;
    private String type;
    private Long deptId;
    @Translation(type = TransConstant.DEPT_ID_TO_NAME)
    private String deptName;
    private Boolean isExistLike;
    private Boolean isExistCollection;

    @Translation(type = TransConstant.OSS_ID_TO_FILE_NAME)
    private String fileName;

    ArrayList<Template> arrayList;
    IPage<Template> iPage;
    private String libraryType;
    public void setIsExistLike(Integer isExistLike) {
        this.isExistLike = (isExistLike == 1);
    }

    public void setIsExistCollection(Integer isExistCollection) {
        this.isExistCollection = (isExistCollection == 1);
    }
}
